package com.wanjia.order.server.controller;

import com.wanjia.order.server.entity.Prodect;
import com.wanjia.order.server.mapper.ProdectMapper;
import com.wanjia.order.server.service.ProdectService;
import com.wanjia.project.commons.dto.ResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/prodect")
public class ProdectController {
    @Autowired
    private ProdectService prodectService;
    @GetMapping("/prodectlist")
    private ResultDTO prodectList(){
        List<Prodect> prodects = prodectService.prodectListAll();
        return new ResultDTO(200,"成功",prodects);
    }
}
